/*
 * @Author: Simon 1958058172@qq.com
 * @Date: 2025-08-08 14:06:52
 * @LastEditors: Simon 1958058172@qq.com
 * @LastEditTime: 2025-08-08 14:32:53
 * @FilePath: \java.1212\csdn\baozhuang\li06\work04.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package csdn.baozhuang.li06;

import java.util.Scanner;

public class work04 {
    public static void main(String[] args) {
        System.out.print("请输入手机号：");
        Scanner scanner=new Scanner(System.in);
        String s=scanner.nextLine();
        //one
        String s1=s.substring(0, 3);
        String s2=s.substring(7);
        System.out.println("处理1:"+s1+"****"+s2);
        //two
        String st=s.replace(s.substring(3, 7), "****");
        System.out.println("处理2::"+st);
    }
}
